#ifndef FILELOG_H
#define FILELOG_H

#include <QString>
#include <QMutex>
#include <QDir>

class FileLog
{
public:
    FileLog(const QString &fName = "qscom", QDir fPath = QDir("."), int mSize = 1024 * 1024 * 1024, bool enTimeshift = false, bool ow = true);
    void logSave(const QString &data);
    void logEnable(bool enable);

private:
    QString fileName;
    QDir path;
    int maxSize;
    bool enableTimeshift;
    bool overwrite;
    QMutex writeLock;

    QString completePath;
    bool enableToFile = true;

    bool fileSizeCheck();
};

#endif // FILELOG_H
